﻿@model CampWeek5__Book_Project_.Data.Model.Author
@{
    ViewBag.Title = "AuthorDetail";
}
<div>
    <a href="/Admin/AdminEditAuthor/@Model.Id" class="btn btn-warning">Edit</a>   <a href="/Admin/AdminDeleteAuthor/@Model.Id" class="btn btn-danger">Delete</a>
    <div class="container well">
        <h2>@Model.AuthorName</h2>
        <div class="col-lg-12 row container-fluid">
            <div class="container col-sm-6">
                <img class="img-responsive  dg-authorDetailImage" src="@Model.AuthorImg" />
            </div>

            <div class="col-sm-6">
                <h3>About @Model.AuthorName</h3>
                <h4><i>@Model.Style</i></h4>
                <h4>From:  @Model.AuthorCountry</h4>
                <p>Born:  @Model.DateOfBirth.ToString("MM/dd/yyyy")</p>
                @if (@Model.DateOfDeath != null)
                {
                    <p>Died:  @Model.DateOfDeath</p>
                }

                <p>@Model.AuthorBio</p>
            </div>


        </div>
    </div>



    <div class="col-md-12 container-fluid">
        <h3>Books by @Model.AuthorName........ </h3>
        <div>
            <div class="row">
                @foreach (var b in Model.Books)
                {

                    <div class="col-lg-3">

                        <br />
                        <a href="/Admin/AdminBookDetail/@b.ISBN">
                            <img id="fp" src="@b.BookImg" />
                            <br />
                            @b.Title
                        </a>
                        <br />
                    </div>
                }
            </div>
        </div>

    </div>

</div>
